package com.farm.quartz.controller;

import com.farm.common.core.domain.AjaxResult;
import com.farm.quartz.Dao.ArticleDao;
import com.farm.quartz.domain.Article;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/tableShow")
public class ArticleController {
    
    @Resource
    ArticleDao articleDao;
    
    @GetMapping("tableNum")
    public AjaxResult tableNum() {
    
        List<Article> articleList = articleDao.findAll();
    
        return AjaxResult.success("成功", articleList);
    }
    
}
